<template>
  <div class="promotion-code-main base-main">
    <div class="header text-c">
      <img src="../../assets/img/logo.png" alt="logo">
      <p class="fs13 colorFFF">饮 用 天 然 富 氢 水</p>
    </div>

    <div class="code-box w80 bgcFFF text-c">
      <p class="title color333 fs18">花都区迎宾大道富氢水分店</p>
      <div class="qrcode inline-block" ref="qrCodeUrl"></div>
      <p class="txt fs15 color666">扫一扫 关联水店怎么怎么样啊</p>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  import QRCode from 'qrcodejs2'
  export default {
    data() {
      return {

      }
    },
    mounted() {
      this.creatQrCode();
    },
    methods: {
      creatQrCode() {
        let qrcode = new QRCode(this.$refs.qrCodeUrl, {
          text: '中国北斗全球梦圆 ——写在北斗三号全球卫星导航系统全面建成之际', // 需要转换为二维码的内容
          width: 200,
          height: 200,
          colorDark: '#000000',
          colorLight: '#ffffff',
          correctLevel: QRCode.CorrectLevel.H
        })
      },
    },
  }
</script>

<style scoped lang="scss">
  @import "../../assets/css/promotionCode.scss";
</style>
